package com.hb.core.pojo.project.section.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hb.core.pojo.parent.MPCommonEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 采购方案/标段(包)信息表
 * </p>
 *
 * @author zhongdl
 * @since 2021-12-18
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("trade_bid_section")
@ApiModel(value = "TradeBidSection对象", description = "采购方案/标段(包)信息表")
public class BidSection extends MPCommonEntity {

    @ApiModelProperty(value = "项目ID")
    private Long projectId;

    @ApiModelProperty(value = "招标文件id")
    private Long fileId;

    @ApiModelProperty(value = "方案包序号(相同项目ID下从1开始的自增整数)")
    private Integer sortCode;

    @ApiModelProperty(value = "方案(包)编号")
    private String sectionCode;

    @ApiModelProperty(value = "方案(包)名称")
    private String sectionName;

    @ApiModelProperty(value = "预算/概算价")
    private BigDecimal price;

    @ApiModelProperty(value = "标段状态, 关联字典")
    private Long sectionStatus;

    @ApiModelProperty(value = "是否流标 1:是 2:否")
    private Integer failFlag;

    @ApiModelProperty(value = "开标时间")
    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime  openBidTime;

    @ApiModelProperty(value = "最高限价信息(json格式的字符串)")
    private String limitConfigInfo;

    @ApiModelProperty(value = "每包件售价/标书售价")
    private BigDecimal pricePerPackage;

    @ApiModelProperty(value = "保证金")
    private BigDecimal bond;

    @ApiModelProperty(value = "非固定金额保证金")
    private String bondStr;

    @ApiModelProperty(value = "是否缴纳保证金")
    private Integer bondFlag;

    @ApiModelProperty(value = "保证金缴纳方式  11 银行转账 12 电子保函 13 其他  多选用,隔开")
    private String bondPayType;

    @ApiModelProperty(value = "控制价金额")
    private BigDecimal controlPrice;

    @ApiModelProperty(value = "价款形式 1 金额 2 比例 3 费率")
    private Integer priceForm;

    @ApiModelProperty(value = "计费方式(1.固定金额.2.非固定金额)")
    private Integer billingMethod;

    @ApiModelProperty(value = "收取方式1 线下 2线上")
    private Integer collectionMethod;

    @ApiModelProperty(value = "监标人, 用户ID, 关联base_user表主键")
    private String monitorName;

    @ApiModelProperty(value = "是否支持保函  1 是 2:否")
    private Integer guaranteeFlag;

    @ApiModelProperty(value = "资格审查方式(1: 预审, 2: 后审)")
    private Integer qualWay;

    @ApiModelProperty(value = "合同估算价")
    private BigDecimal estimatedContractPrice;

    @ApiModelProperty(value = "方案(包)内容")
    private String sectionContent;

    @ApiModelProperty(value = "联合体投标")
    private Integer consortiumBiddingFlag;

    @ApiModelProperty(value = "开标设置Id")
    private Long openingSetId;

    /**
     * 文件发售开始时间
     */
    @ApiModelProperty(value = "文件发售开始时间")
    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime documentSaleStartTime;

    /**
     * 文件发售结束时间
     */
    @ApiModelProperty(value = "文件发售结束时间")
    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime documentSaleEndTime;

    /**
     * 澄清问题提交截止时间
     */
    @ApiModelProperty(value = "澄清问题提交截止时间")
    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime  clarificationSubmissionEndTime;

    @ApiModelProperty(value = "报名开始时间")
    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime  signStartTime;

    @ApiModelProperty(value = "报名结束时间")
    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime  signEndTime;

    /**
     * 是否两阶段
     */
    @ApiModelProperty(value = "是否两阶段")
    private Integer twoStageFlag;

    /**
     * 是否收取报名费
     */
    @ApiModelProperty(value = "是否收取报名费")
    private Integer registrationFeeFlag;

    /**
     * 报名费收款方式ID
     */
    @ApiModelProperty(value = "报名费收款方式ID")
    private Long signUpCollectionId;

    /**
     * 报名费金额
     */
    @ApiModelProperty(value = "报名费金额")
    private BigDecimal registrationFeeMoney;

    @ApiModelProperty(value = "是否报名(是否需要备案)")
    private Integer signUpFlag;

    /**
     * 系统使用费
     */
    @ApiModelProperty(value = "系统使用费")
    private BigDecimal systemUseFee;

    /**
     * 系统使用费收款方式ID
     */
    @ApiModelProperty(value = "系统使用费收款方式ID")
    private Long sysCollectionId;



/*    @ApiModelProperty(value = "收款方(系统使用费)")
    private String sysPayee;

    @ApiModelProperty(value = "收款方式(系统使用费) 1 支付宝 2 微信 3 银联")
    private Integer sysPayType;

    @ApiModelProperty(value = "银行账号(系统使用费)")
    private String sysBankAccount;

    @ApiModelProperty(value = "银行户名(系统使用费)")
    private String sysBankAccountName;

    @ApiModelProperty(value = "开户行(系统使用费)")
    private String  sysBankDeposit;

    @ApiModelProperty(value = "收款码(系统使用费)")
    private String sysCollectionCode;*/


    @ApiModelProperty(value = "邀请开始时间")
    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime invitationStartTime;

    @ApiModelProperty(value = "邀请结束时间")
    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime invitationEndTime;

    @ApiModelProperty(value = "是否线上开标  1：是 2：否")
    @TableField(exist = false)
    private Integer openFlag;

}
